<!--
 * @Author: xuzehan 123@qq.com
 * @Date: 2023-04-24 15:56:19
 * @LastEditors: xuzehan 123@qq.com
 * @LastEditTime: 2023-06-08 09:05:45
 * @FilePath: \ant-design-vue-jeecg-master\src\views\networkStatus\modules\carStatus.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <select-channel ref="selectChannel" />
    <statusBox :data="data" froms="car" @handleQuery="handleQuery" />
  </div>
</template>

<script>
import statusBox from './components/status.vue'
import selectChannel from './components/selectChannel.vue'
import { getAction, httpAction } from '@/api/manage.js'
export default {
  components: {
    statusBox,
    selectChannel,
  },
  data() {
    return {
      data: 'F',
      options: [
        {
          value: '车1',
          label: '车1',

        },
        {
          value: '车2',
          label: '车2',

        },
        {
          value: '车3',
          label: '车3',

        },
        {
          value: '车4',
          label: '车4',

        },
      ],
      carInfo: undefined,
      url: {
        carlist: '/commandVehicle/nmcCommandVehicle/list',
      }
    }
  },
  created() {
    this.getCarList()
  },
  methods: {
    getCarList() {
      getAction(this.url.carlist, { pageSize: -1 }).then((res) => {
        this.options = res.result.records
      })
    },
    handleQuery() {
      let temp = { packageCode: '17指挥车网络状态查询指令' }
      this.$refs.selectChannel.showModal(temp)
      console.log('17指挥车网络状态查询指令')
    },
    onChange(value) {
      console.log(value)
    },
    callback(key) {
      // console.
      console.log(key)
    },
  },
}
</script>

<style></style>
